<template>
    <div>
        
        <a-tooltip title="终端" v-if="isButton">
            <a-badge :count="cmd.length">
                <a-button shape="circle">
                    <Icon name="ant-icon-CodeTwoTone" />
                </a-button>
            </a-badge>
        </a-tooltip>
    </div>
</template>

<script setup lang="ts">

const props = defineProps({
    isButton: {
        type: Boolean,
        default: false
    },
    cmd: {
        type: Array,
        default: () => []
    }
})

/**
 * 执行命令
 */
const runCmd = () => {
    console.log(props.cmd)
}

onMounted(() => {
    runCmd()
})
</script>